<include file="Public/min-header"/>

<link href="__PUBLIC__/plugins/daterangepicker/daterangepicker-bs3.css" rel="stylesheet" type="text/css"/>
<script src="__PUBLIC__/plugins/daterangepicker/moment.min.js" type="text/javascript"></script>
<script src="__PUBLIC__/plugins/daterangepicker/daterangepicker.js" type="text/javascript"></script>

<div class="wrapper">
    <include file="Public/breadcrumb"/>
    <section class="content" style="padding:0px 15px;">
        <!-- Main content -->
        <div class="container-fluid">
            <div class="pull-right">
                <a href="javascript:history.go(-1)" data-toggle="tooltip" title="" class="btn btn-default"
                   data-original-title="返回"><i class="fa fa-reply"></i></a>
            </div>
            <div class="panel panel-default">
                <div class="panel-body ">
                    <ul class="nav nav-tabs">
                        <foreach name="group_list" item="vo" key="k">
                            <li
                            <if condition="$k eq 'shopping'">class="active"</if>
                            ><a href="javascript:void(0)" data-url="{:U('System/index',array('inc_type'=>$k))}"
                                data-toggle="tab" onclick="goset(this)">{$vo}</a></li>
                        </foreach>
                    </ul>
                    <!--表单数据-->
                    <form method="post" id="handlepost" action="{:U('System/handle')}">
                        <!--通用信息-->
                        <div class="tab-content col-md-10">
                            <div class="tab-pane active" id="tab_tongyong">
                                <table class="table table-bordered">
                                    <tbody>
                                    <tr>
                                        <td class="col-sm-2">全场满多少免运费：<br/>(0表示不免运费)</td>
                                        <td class="col-sm-8">
                                            <input type="number" pattern="^\d{1,}$" title="只能输入数字" class="form-control"
                                                   name="freight_free" value="{$config.freight_free|default='0'}">
                                            <span id="err_attr_name" style="color:#F00; display:none;"></span>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>积分换算比例：</td>
                                        <td>
                                            <input type="radio" class="" name="point_rate" value="1"
                                            <if condition="$config[point_rate] eq 1"> checked</if>
                                            >1元 = 1积分 &nbsp;&nbsp;&nbsp;&nbsp;
                                            <input type="radio" class="" name="point_rate" value="10"
                                            <if condition="$config[point_rate] eq 10"> checked</if>
                                            >1元 = 10积分 &nbsp;&nbsp;&nbsp;&nbsp;
                                            <input type="radio" class="" name="point_rate" value="100"
                                            <if condition="$config[point_rate] eq 100"> checked</if>
                                            >1元 = 100积分
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>发货后多少天自动收货：</td>
                                        <td>
                                            <select class="form-control" name="auto_confirm_date" id="distribut_date">
                                                <for start="1" end="31" name="i">
                                                    <option value="{$i}"
                                                    <if condition="$config[auto_confirm_date] eq $i">
                                                        selected="selected"
                                                    </if>
                                                    >{$i}天</option>
                                                </for>
                                            </select>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            收货多少天后：<br/>
                                            金额转入卖家平台余额
                                        </td>
                                        <td>
                                            <select class="form-control" name="auto_transfer_date"
                                                    id="auto_transfer_date">
                                                <for start="1" end="31" name="i">
                                                    <option value="{$i}"
                                                    <if condition="$config[auto_transfer_date] eq $i">
                                                        selected="selected"
                                                    </if>
                                                    >{$i}天</option>
                                                </for>
                                            </select>
                                        </td>
                                    </tr>
                                    </tbody>
                                    <tfoot>
                                    <tr>
                                        <td><input type="hidden" name="inc_type" value="{$inc_type}"></td>
                                        <td class="text-right"><input class="btn btn-primary" type="buuton"
                                                                      onclick="adsubmit()" value="保存"></td>
                                    </tr>
                                    </tfoot>
                                </table>
                            </div>
                        </div>
                    </form><!--表单数据-->
                </div>
            </div>
        </div>
    </section>
</div>
<script>
    function adsubmit() {
        $('#handlepost').submit();
    }

    $(document).ready(function () {
        get_province();
    });

    function goset(obj) {
        window.location.href = $(obj).attr('data-url');
    }
</script>

</body>
</html>